from django.conf.urls.defaults import *
#from tvapi.thetvdb.views import *
from tvapi.api.thetvdb.views import *
#from tvapi.api.views import *
import tvapi

# Uncomment the next two lines to enable the admin:
#from django.contrib import admin
#admin.autodiscover()

urlpatterns = patterns('',
    # Example:
    # (r'^thetvdbapi/', include('thetvdbapi.foo.urls')),

    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
    # to INSTALLED_APPS to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),


    # JSON 

    (r'^search/(?P<name>[0-9a-zA-Z]+)', tvapi.api.thetvdb.views.Search),
    (r'^series/search/(?P<title>[0-9a-zA-Z]+)', tvapi.api.thetvdb.views.SeriesSearch),
    (r'^series/details/(?P<id>[0-9]+)', tvapi.api.thetvdb.views.SeriesDetails),
    (r'^episode/list/(?P<id>[0-9]+)', tvapi.api.thetvdb.views.EpisodeList),
    (r'^episode/detail/(?P<id>[0-9]+)', tvapi.api.thetvdb.views.EpisodeDetail),
    (r'^season/list/(?P<id>[0-9]+)', tvapi.api.thetvdb.views.SeasonList),
    (r'^actor/detail/(?P<actor_id>[0-9]+)/(?P<series_id>[0-9]+)', tvapi.api.thetvdb.views.ActorDetail),
    (r'^languages', tvapi.api.thetvdb.views.ListLanguages),

    (r'^image/(?P<obj_id>[0-9]+)/(?P<type>[a-z]+)/(?P<img_id>[0-9\-]+)\.jpg', tvapi.api.thetvdb.views.get_image),
    (r'^image/(?P<obj_id>[0-9]+)/(?P<type>[a-z]+)/(?P<series_id>[0-9]+)/(?P<img_id>[0-9\-]+)\.jpg', tvapi.api.thetvdb.views.get_episode_image),

)
